<!--
 * @Description: 
 * @Version: 2.0
 * @Autor: 刘世琪
 * @Date: 2021-03-11 10:24:34
 * @LastEditors: Seven
 * @LastEditTime: 2021-03-11 13:44:05
-->
<template>
    <div>
         <div style="width: 100%;height: calc(100vh - 207px);background: #ffffff;margin-top: 20px;">
      <a-table
        rowKey="id"
        :columns="columns"
        :data-source="data"
        :pagination="{ pageSize: 20 }"
        :scroll="{ y: clientHeight - 350 }"
      >
        <span slot="action" slot-scope="text, record">
          <a-button type="primary" @click="showModal(true,record)">修改</a-button>
          <a-divider type="vertical"/>
          <a-button type="danger" @click="showDeleteConfirm(text)">删除</a-button>
        </span>
      </a-table>
    </div>

        

    </div>
</template>

<script>
import axios from 'axios'
const columns = [
    {
      title: '',
      dataIndex: 'role.role_name',
      // dataIndex: 'role_name',
      width: 300,
    },
    {
      title: '有效状态',
      dataIndex: 'age',
      width: 150,
    },
    {
      title: '操作',
      key: 'action',
      scopedSlots: { customRender: 'action' },
      width: 300,
    },
  ];
export default {
    data() {
        return {
            data:[],
            columns, 
            clientHeight: 0,     // 设置默认值

        }
    },
    methods: {

    },
    created() {

    }
}
</script>

<style scoped>

</style>
